﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Box.Entities;
namespace Box.Repository.Mapping
{
  public  class BancoMap : EntityTypeConfiguration<Banco>
    {
      public BancoMap() {
          this.HasKey(p => p.Id);
          this.Property(p => p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

          this.Property(p => p.NombreBanco)
            .IsRequired()
            .HasMaxLength(150);

          this.ToTable("BANCO");
          this.Property(p => p.Id).HasColumnName("Id");
          this.Property(p => p.NombreBanco).HasColumnName("NombreBanco");
          this.Property(p => p.DescripcionBanco).HasColumnName("DescripcionBanco");
      }
    }
}
